//
//  YCAPICenter+Home.m
//  YCAdapterMode
//
//  Created by 安跃超 on 2018/12/3.
//  Copyright © 2018年 安跃超. All rights reserved.
//

#import "YCAPICenter+Home.h"

#define BASEURL @"http://10.2.0.55:8082/"

#define BASEURL1 [NSString stringWithFormat:@"%@%@",BASEURL,@"api/testget/p3/header"]
//@"http://192.168.1.16:8082/api/testget/p3/header"
//#define BASEURL2 @"http://192.168.1.16:8082/api/testget/p3"
#define BASEURL2 [NSString stringWithFormat:@"%@%@",BASEURL,@"api/testget/p3"]
//#define BASEURL3 @"http://192.168.1.16:8082/api/testpost/p2"
#define BASEURL3 [NSString stringWithFormat:@"%@%@",BASEURL,@"api/testpost/p2"]
//#define BASEURL4 @"http://192.168.1.16:8082/api/testput/p1"
#define BASEURL4 [NSString stringWithFormat:@"%@%@",BASEURL,@"api/testput/p1"]
//#define BASEURL5 @"http://192.168.1.16:8082/api/testpost/p2"
#define BASEURL5 [NSString stringWithFormat:@"%@%@",BASEURL,@"api/testpost/p2"]
//#define BASEURL6 @"http://192.168.1.16:8082/api/testput/p1"
#define BASEURL6 [NSString stringWithFormat:@"%@%@",BASEURL,@"api/testput/p1"]
//#define BASEURL7 @"http://192.168.1.16:8082/api/testget/p3"
#define BASEURL7 [NSString stringWithFormat:@"%@%@",BASEURL,@"api/testget/p3"]
//#define BASEURL @"http://192.168.1.16:8082/api/testget/p3/header?v1=2&v2=10"

@implementation YCAPICenter(Home)

YCStrongSynthesize(home, [YCAPIRequest request]
                   .setMethod(GET)
                   .setCustomURL(BASEURL1)
                   .setParams(@{@"v1":@"home",
                                @"v2":@"GET"})
                   .setHeader(@{@"access_token":@"accessTokenaccessToken",
                                @"refresh_token":@"refreshToken"})
                   .setObjReformerDelegate(self.defaultReformer))

//static void *homeAssociatedKey =  "homeassociated";
//
//- (void)set__nonuse__home:(YCAPIRequest *)name { \
//    objc_setAssociatedObject(self, homeAssociatedKey, name, OBJC_ASSOCIATION_RETAIN_NONATOMIC); \
//}
//
//+ (YCAPIRequest *)home {
//    id _home = objc_getAssociatedObject(self, homeAssociatedKey);
//    if (!_home) {
//        YCAPIRequest *api = [YCAPIRequest request]
//        .setMethod(GET)
//        .setCustomURL(@"get")
//        .setObjReformerDelegate(self.defaultReformer);
//        _home = api;
//    }
//    return _home;
//}
//
//+ (YCAPIRequest *)name {
//    return [[self defaultCenter] home];
//}

@end
